﻿@{
    ViewData["Title"] = "网络唤醒 (Wake-on-LAN)";
}

<h2>网络唤醒设备</h2>

<form method="post" asp-action="SendWake" asp-controller="Home">
    <div class="mb-3">
        <label for="macAddress" class="form-label">MAC 地址 (格式: AA:BB:CC:DD:EE:FF 或 AABBCCDDEEFF)</label>
        <input type="text" class="form-control" id="macAddress" name="macAddress" placeholder="例如: 00:11:22:33:44:55" required />
    </div>
    <button type="submit" class="btn btn-primary">发送唤醒包</button>
</form>

@if (!string.IsNullOrEmpty(ViewBag.Success))
{
    <div class="alert alert-success mt-3">@ViewBag.Success</div>
}
@if (!string.IsNullOrEmpty(ViewBag.Error))
{
    <div class="alert alert-danger mt-3">@ViewBag.Error</div>
}